/********************************************************************************
 * Project Name		[JavaEE_JDBC]
 * File Name     	[UserDao.java]
 * Creation Date 	[2015-01-01]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ********************************************************************************/
package dao;

import bean.User;

/**
 * UserDao
 * 
 * @author 不落的太阳(Sean Yang aka ShortPeace)
 * @version 1.0
 * @since jdk 1.8
 * 
 */
public interface UserDao {

	/**
	 * 添加用户
	 * 
	 * @param user
	 * @return
	 */
	public boolean addUser(User user);

	/**
	 * 根据姓名查找用户
	 * 
	 * @param username
	 * @return
	 */
	public User findUserByName(String username);

	/**
	 * 根据姓名更新用户
	 * 
	 * @param user
	 * @param username
	 * @return
	 */
	public boolean updateUserByName(User user, String username);

	/**
	 * 根据姓名删除用户
	 * 
	 * @param username
	 * @return
	 */
	public boolean deleteUserByName(String username);

	/**
	 * 用户登陆
	 * 
	 * @param username
	 * @param password
	 * @return
	 */
	public boolean login(String username, String password);
}
